package com.lcf.system.vo.tenantUser;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.lcf.common.annotation.DictTable;
import com.lcf.common.enums.ServiceTableEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

/**
 * 租户-用户(SysTenantUser)表实体类
 *
 * @author lcf
 * @since 2025-03-02 23:00:38
 */
@Data
@NoArgsConstructor
public class SysTenantUserPageVO {
    @Schema(description = "主键id")
    private Long id;

    //租户id
    @Schema(description = "租户id")
    private Long tenantId;
    //用户id
    @Schema(description = "用户id")
    @DictTable(serviceTableEnum = ServiceTableEnum.SYSTEM_SYS_USER, primaryKey = "id", fields = {"name"}, nameField = {"name"})
    private Long userId;
    //用户姓名
    @Schema(description = "姓名")
    private String name;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @JsonIgnore
    @Schema(description = "创建人id")
    private Long createBy;

    @Schema(description = "创建人名称")
    private String createUser;

    @Schema(description = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @JsonIgnore
    @Schema(description = "更新人id")
    private Long updateBy;

    @Schema(description = "更新人名称")
    private String updateUser;
}

